<template>
  <el-row :gutter="10">
    <el-col :span="24">
      <el-card>
        <div style="height: 50px">
          <el-form ref="form"  :model="form" label-width="80px">
              <el-select v-model="form.exam" placeholder="请选择考试" filterable  >
                <el-option v-for="exam in exams"  :label="exam.name" :value="exam.name" :key="exam.id"></el-option>
              </el-select>

              <el-select v-model="form.grade" placeholder="请选择年级">
                <el-option v-for="grade in grades"  :label="grade.name" :value="grade.name" :key="grade.id"></el-option>
              </el-select>
              <el-select v-model="form.class1" placeholder="请选择班级">
                <el-option v-for="class1 in classes"  :label="class1 .name" :value="class1.name" :key="class1.id"></el-option>
              </el-select>
              <el-select v-model="form.subject" :disabled="isTeacher" :placeholder=this.form.subject>
                <el-option v-for="subject in subjects"  :label="subject.name" :value="subject.name" :key="subject.id"></el-option>
              </el-select>
          </el-form>
        </div>
        <div style="height: 50px">
          <el-button type="primary" style="width: 100px" @click="query()">查询</el-button>
        </div>
      </el-card>
      <el-card>
        <el-table :data="tableData" border :header-cell-class-name="{background: 'aliceblue',fontSize:'16px'}">
          <el-table-column label="学号" prop="id" align="center"></el-table-column>
          <el-table-column label="姓名" prop="s_name" align="center"></el-table-column>
          <el-table-column label="考试编号" prop="name" align="center"></el-table-column>
          <el-table-column label="科目" prop="age" align="center"></el-table-column>
          <el-table-column label="分数" prop="address" align="center"></el-table-column>
<!--          <el-table-column label="操作" >-->
<!--            <template v-slot="scope">-->
<!--              <el-button type="primary" @click="edit(scope.row)" >编辑</el-button>-->
<!--              <el-button type="danger" @click="edit(scope.row)" >删除</el-button>-->
<!--            </template>-->
<!--          </el-table-column>-->
        </el-table>
      </el-card>
    </el-col>
  </el-row>
</template>

<script>
export default {
  name: "Scores",
  data(){
    return{
      isTeacher:'ture',
      exams:[
        {name:'2024上半学年第一次月考',id:1},
        {name:'2024上半学年第二次月考',id:2},
        {name:'2024上半学年期中考试',id:3},
        {name:'2024上半学年六省联考',id:4},
        {name:'2023下半学年期末考试',id:5},
        {name:'2023下半学年期中考试',id:6},
        {name:'2023下半学年第三次月考',id:7},
        {name:'2023下半学年第二次月考',id:8},
        {name:'2023下半学年第一次月考',id:9},
      ],
      grades:[
        {name:'2021级',id:1},
        {name:'2022级',id:2},
        {name:'2023级',id:3},
      ],
      classes:[
        {name:'全年级学生',id:1},
        {name:'1班',id:2},
        {name:'2班',id:3},
        {name:'3班',id:4},
        // {name:this.form.grade+'4班'},
      ],
      subjects:[
        {name:'语文',id:1},
        {name:'数学',id:2},
        {name:'英语',id:3},
        {name:'物理',id:4},
        {name:'化学',id:5},
        {name:'生物',id:6},
        {name:'政治',id:7},
        {name:'历史',id:8},
        {name:'地理',id:9},

      ],
      form:{
        exam:'',
        grade:'',
        class1:'',
        subject:'语文'
      },
      tableData:[
        {s_name:'田朝阳',name:'2051690383',address:'125',id:205169,age:'语文'},
        {s_name:'王天硕',name:'2051690464',address:'103',id:205168,age:'语文'},
        {s_name:'秦嘉铭',name:'2051690486',address:'106',id:205167,age:'语文'},
        {s_name:'刘诗尧',name:'2051690256',address:'111',id:205166,age:'语文'},
        {s_name:'乔祚涵',name:'2051690320',address:'116',id:205165,age:'语文'},
      ],
    }
  },
  methods:{
    query(){

    }
  },
}
</script>

<style scoped>

</style>